using NUnit.Framework;
using Tycho.Parser.Peg;

namespace Tycho.Parser.Tests.Peg {
    [TestFixture]
    public class SourceFileInformationSpecification {
        [Test]
        public void ShouldReturnSourceInformationWithFileName () {
            var sf = new SourceFileInformation ("filename");
            SourceInformation sinfo = sf.CreateSourceInformation (3, 4);

            Assert.That (sinfo.FileName, Is.EqualTo ("filename"));
            Assert.That (sinfo.Index, Is.EqualTo (3));
            Assert.That (sinfo.Length, Is.EqualTo (4));
        }
    }
}